import React, { PropTypes } from 'react';
import { Router, Route, IndexRoute, Link, hashHistory } from 'react-router';
import Home from '../components/Home/index';
import Layout from  '../components/Layouts/HomeLayout';
import NotFound from '../components/NotFound.jsx';
import Products from '../components/Home/Products';

const Routes = (location) =>
  <Router history={hashHistory}>
    <Route path="/" component={Home} />
    <Route path="/pages" component={Layout}>
      <IndexRoute component={NotFound}/>
      <Route path="/pages/products" component={Products} />
    </Route>
    <Route path="*" component={Layout}>
      <IndexRoute component={NotFound} />
    </Route>
  </Router>;

Routes.propTypes = {
  history: PropTypes.any,
};

export default Routes;
